Skip to content

Instantly share code, notes, and snippets.

@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 10, 2024 08:51
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@mcarilli
mcarilli / nsight.sh
Last active May 10, 2024 08:48
Favorite nsight systems profiling commands for Pytorch scripts
# This isn't supposed to run as a bash script, i named it with ".sh" for syntax highlighting.
# https://developer.nvidia.com/nsight-systems
# https://docs.nvidia.com/nsight-systems/profiling/index.html
# My preferred nsys (command line executable used to create profiles) commands
#
# In your script, write
# torch.cuda.nvtx.range_push("region name")
# ...
@pissang
pissang / ts-type-guide.md
Last active May 10, 2024 08:45
TypeScript 类型编写指南

TypeScript 类型编写指南

前言

本文主要作为平时在 TypeScript 代码中编写类型以及对 TypeScript 代码进行 review 时候的参考手册,并非强制执行的规范,也不涉及纯代码风格以及代码逻辑上的指导。

前置阅读

本文内容参考了下面几个手册,所以强烈建议能够同时阅读完这几个手册。如果大家对 TypeScript 的一些基础用法和特性还不熟悉,也建议先阅读第一个 TypeScript 手册。

@jschaf
jschaf / scratch_server.go
Created March 12, 2019 07:40
A Go web server from scratch using syscalls
package main
// Simple, single-threaded server using system calls instead of the net library.
//
// Omitted features from the go net package:
//
// - TLS
// - Most error checking
// - Only supports bodies that close, no persistent or chunked connections
// - Redirects
@JoaoCarabetta
JoaoCarabetta / xml_to_csv.py
Last active May 10, 2024 08:41
Three lines to convert xml to csv
import xmltodict
import pandas as pd
import requests
xml = request.get('url').text
df = pd.DataFrame(xmltodict.parse(xml))
df.rename(columns=lambda x: x.replace('@', ''), inplace=True)
df.to_csv('data.csv')
@STiXzoOR
STiXzoOR / TeamViewer-15-id-changer-for-mac.py
Last active May 10, 2024 08:37 — forked from 0x2a94b5/TeamViewer-15-id-changer-for-mac.py
Teamviewer 15 ID Changer for macOS (Python 3)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# System: macOS 12+
# Version: TeamViewer v15.x.x
# Python: 3.x.x
# Command: sudo python TeamViewer-15-id-changer.py
#
import os
@ebuildy
ebuildy / index.py
Last active May 10, 2024 08:34
List gitlab container registry size, per project, via gitlab API
import gitlab
import urllib3
import humanfriendly
import timeago, datetime
# 2020-04-24T12:04:26.475+00:00
date_now = datetime.datetime.now()
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
@simondiep
simondiep / create-org-repo-via-github-app.md
Last active May 10, 2024 08:34
Steps to automate the creation of repos as a github app without needing user credentials
  1. Create a Github App (Organization > Settings > Developer Settings > Github Apps). This name will be publicly visible and any repo invites will show this name in the invite email.
  2. Set the permissions to read/write for repository administration and repository contents.
  3. Install the Github App for your organization (Github App > Install App)
  4. Generate a private key for your Github App
  5. Copy the Ruby Script to generate a JWT from your private key https://developer.github.com/apps/building-github-apps/authentication-options-for-github-apps/
require 'openssl'
require 'jwt' # https://rubygems.org/gems/jwt
@JBlond
JBlond / bash-colors.md
Last active May 10, 2024 08:31 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple